package com.zhoukx.factory.factorymethod.pizzastore.pizza;

// 将pizza 披萨类
public abstract class Pizza {
    // 披萨的名字
    protected String name;
    // 准备原材料,不同的披萨是不一样的。因此 是抽象的
    public abstract void prepare();

    public void bake() {
        System.out.println(name + " baking;");
    }

    public void cut() {
        System.out.println(name + " cutting;");
    }

    public void box() {
        System.out.println(name + " boxing;");
    }

    public void setName(String name) {
        this.name = name;
    }
}
